<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <ui:composition template="/shared/_layout.xhtml">
        <ui:define name="title">
            Espace d'administration de BooXtore.com
        </ui:define>
        <ui:define name="css">
            <h:outputStylesheet library="css" name="form.css"/>
            <h:outputStylesheet library="css" name="login.css"/>
        </ui:define>
        <ui:define name="content">
            <f:event listener="#{accountLogin.isLogged()}" type="preRenderView" />
            <h1>Espace d'administration de BooXtore.com</h1>
            <article>
                <h:form>
                    <p>
                        <h:messages errorClass="errorMessage" infoClass="infoMessage" 
                                    warnClass="warnMessage"/>
                    </p>
                    <p>
                        <h:outputLabel for="username" value="Nom d'utilisateur"/>
                        <br/>
                        <h:inputText id="username" required="true" 
                                     label="Nom d'utilisateur"
                                     value="#{accountLogin.username}"/>
                    </p>
                    <p>

                        <h:outputLabel for="password" value="Mot de passe"/>
                        <br/>
                        <h:inputSecret id="password" required="true"
                                       label="Mot de passe"
                                       value="#{accountLogin.password}"/>
                    </p>
                    <p>
                        <h:commandButton value="Connexion" action="#{accountLogin.login()}"/>
                        <h:outputText value="&#160;"/>
                        <h:commandButton type="reset" value="Effacer"/>
                    </p>
                </h:form>
            </article>
        </ui:define>
    </ui:composition>
</html>